
//防抖封装
export function debouce(func,delay){
  let time=null;
  return function (...args){
    if(time) clearImmediate(time)
    time=setTimeout(() => {
      func.apply(this,args)
    }, delay);
  }
}